******************************
******************************
* Replication Files for Towards a Theory of Minority-Party Influence in the U.S. Congress: Whip Counts, Amendment Votes, and Minority Leverage in the House
	* Authors Jeffery A. Jenkins, Nathan W. Monroe, Tessa Provins
******************************
******************************

* Notes: 
	* Figure 1 was produced in excel. Figure 1 data is included in seperate file. 
	* Must insert file path in order to create tables in paper.

******************************

**********
* Load Data 
**********
* Set Working Directory (if necessary)
	*cd "[INSERT DIRECTORY FILE PATH]"
	
* Load Data	
	use "Replication Data Jenkins, Monroe, Provins 2023.dta"
		
**********	
* Table 1 Predicting Minority-Party Amendment Disappointments *
**********

	eststo: glm minoritysouthern_disapbiB whipbiB ib84.congress, robust 
	eststo: glm minoritysouthern_disapbiB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity ib84.congress, robust 
	eststo: glm minoritysouthern_disapbiB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress, robust
	
	*esttab using "[INSERT DIRECTORY FILE PATH].rtf" ,	replace nogaps keep(whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB _cons)  label star(* 0.10 ** 0.05 *** 0.01) b(4) se(4) aic(2) bic(2) nonumbers mtitles("Model 1" "Model 2" "Model 3") compress indicate("Congress Fixed Effects = *congress*") 
	
	eststo clear	


**********
* Table 2 Predicting Majority-Party Amendment Rolls *
**********

	eststo: glm majrollbiB whipbiB ib84.congress, robust 
	eststo: glm majrollbiB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB  DividedGovernment party_unity ib84.congress, robust 
	eststo: glm majrollbiB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB  DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress, robust
	
	*esttab using "[INSERT DIRECTORY FILE PATH].rtf" ,	replace nogaps keep(whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB _cons)  label star(* 0.10 ** 0.05 *** 0.01) b(4) se(4) aic(2) bic(2) nonumbers mtitles("Model 1" "Model 2" "Model 3") compress indicate("Congress Fixed Effects = *congress*") 
	
	eststo clear
	


**********
* Figure 2 The Effect of Whip Counts on the Probability of Minority Disappointments and Majority Rolls *
**********

	* Minority Dissappointments Substantive Effects
	glm minoritysouthern_disapbiB i.whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress, robust
	
	margins whipbiB
		*marginsplot
		marginsplot, title("Minority Disappointments", justification(center)) ytitle("Probability of Minority Disappointment") graphregion(color(white)) bgcolor(white) scheme(sj) yscale(range(.2 .6)) ylab(.2(0.05).6) xscale(range(-.25 1.25))  xlab(0(1)1) plot1opts(msymbol(S) mcolor("gs0") msize(large))
		*graph save Graph "[INSERT DIRECTORY FILE PATH].gph", replace

* Majority Rolls Substantive Effects
	glm majrollbiB i.whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress, robust
	
	margins whipbiB
		*marginsplot
		marginsplot, title("Majority Rolls", justification(center)) ytitle("Probability of Majority Roll") graphregion(color(white)) bgcolor(white) scheme(sj) yscale(range(.2 .6)) ylab(.2(0.05).6) xscale(range(-.25 1.25)) xlab(0(1)1) plot1opts(msymbol(S) mcolor("gs0") msize(large))
		*graph save Graph "[INSERT DIRECTORY FILE PATH].gph", replace

	*graph combine "[INSERT DIRECTORY FILE PATH].gph" "[INSERT DIRECTORY FILE PATH].gph", graphregion(fcolor(white))
	*graph export "[INSERT DIRECTORY FILE PATH].png", replace



**********
* Appendix A Table 1 [Summary Statistic] *
**********

asdoc sum whipbiB majrollbiB minoritysouthern_disapbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB, replace save([INSERT DIRECTORY FILE PATH].doc) font(Times New Roman) fs(12) fhc(\b) dec(3) label stat(mean sd min max N) drop(Constant) title(Summary Statistics for Dependent and Treatment Variables) 

**********
* Appendix B Table 1 [Summary Statistics for Variations of the Dependent and Explanatory Variables] *
**********

	asdoc sum whipbiB whipquestioncountB numpolltotalB majrollbiB majrollpropB majrollcountB minoritysouthern_disapbiB minoritysouthern_disappropB minoritysouthern_disapcountB, replace save([INSERT DIRECTORY FILE PATH].doc) font(Times New Roman) fs(12) fhc(\b) dec(3) label stat(mean sd min max N) title(Summary Statistics for Dependent and Treatment Variables) 
	
	
**********
* Appendix B Table 2 [Predicting Minority Amendment Disappointments, While Varying Key Explanatory Variable] *

	eststo: glm minoritysouthern_disapbiB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress, robust
	eststo: nbreg minoritysouthern_disapbiB whipquestioncountB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress, robust	
	eststo: nbreg minoritysouthern_disapbiB numpolltotalB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress if numpolltotalB>=1, robust 
	
	*esttab using "[INSERT DIRECTORY FILE PATH].rtf" , replace nogaps keep(whipbiB whipquestioncountB numpolltotalB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB _cons) order(whipbiB whipquestioncountB numpolltotalB) label star(* 0.10 ** 0.05 *** 0.01) b(4) se(4) aic(2) bic(2) nonumbers mtitles("Model 1" "Model 2" "Model 3") compress indicate("Congress Fixed Effects = *congress*") 
	
	eststo clear


**********

**********
* Appendix B Table 3 [Predicting Majority-Party Amendment Rolls, While Varying Key Explanatory Variable] *
**********

	eststo: glm minoritysouthern_disapbiB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress, robust
	eststo: nbreg minoritysouthern_disapbiB whipquestioncountB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress, robust	
	eststo: nbreg minoritysouthern_disapbiB numpolltotalB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress if numpolltotalB>=1, robust 
	
	*esttab using "[INSERT DIRECTORY FILE PATH].rtf" , replace nogaps keep(whipbiB whipquestioncountB numpolltotalB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB _cons) order(whipbiB whipquestioncountB numpolltotalB) label star(* 0.10 ** 0.05 *** 0.01) b(4) se(4) aic(2) bic(2) nonumbers mtitles("Model 1" "Model 2" "Model 3") compress indicate("Congress Fixed Effects = *congress*") 
	
	eststo clear

**********
* Appendix B Table 4 [Varying Minority-Party Disappointments Dependent Variable] *
**********
	eststo: glm minoritysouthern_disapbiB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress, robust
	eststo: reg minoritysouthern_disappropB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress, robust
	eststo: nbreg minoritysouthern_disapcountB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress, robust
	
	*esttab using "[INSERT DIRECTORY FILE PATH].rtf" , replace nogaps keep(whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB _cons)  label star(* 0.10 ** 0.05 *** 0.01) b(4) se(4) r2(4) scalars(F chi2)  aic(2) bic(2) nonumbers mtitles("Model 1" "Model 2" "Model 3") compress indicate("Congress Fixed Effects = *congress*") 
	
	eststo clear


**********
* Appendix B Table 5 [Varying Majority-Party Rolls Dependent Variable] *
**********
	eststo: glm majrollbiB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress, robust
	eststo: reg majrollpropB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress, robust
	eststo: nbreg majrollcountB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress, robust
	
	*esttab using "[INSERT DIRECTORY FILE PATH].rtf" , replace nogaps keep(whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB _cons)  label star(* 0.10 ** 0.05 *** 0.01) b(4) se(4) r2(4) scalars(F chi2)  aic(2) bic(2) nonumbers mtitles("Model 1" "Model 2" "Model 3") compress indicate("Congress Fixed Effects = *congress*") 
	
	eststo clear


**********
* Appendix B Table 6 [Predicting Minority-Party Amendment Disappointments, While Varying Time Period] *
**********

	eststo: glm minoritysouthern_disapbiB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress if congress<90, robust 
	eststo: glm minoritysouthern_disapbiB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress if congress>=90 & congress<100, robust 
	eststo: glm minoritysouthern_disapbiB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress if congress>=100, robust 
			
	*esttab using "[INSERT DIRECTORY FILE PATH].rtf" ,	replace nogaps keep(whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB _cons)  label star(* 0.10 ** 0.05 *** 0.01) b(4) se(4) aic(2) bic(2) nonumbers mtitles("Model 1" "Model 2" "Model 3") compress indicate("Congress Fixed Effects = *congress*") 
	
	eststo clear	


**********
* Appendix B Table 7 [Predicting Majority-Party Amendment Rolls, While Varying Time Period] *
**********

	eststo: glm majrollbiB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress if congress<90, robust 
	eststo: glm majrollbiB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress if congress>=90 & congress<100, robust 
	eststo: glm majrollbiB whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB ib84.congress if congress>=100, robust 
			
	*esttab using "[INSERT DIRECTORY FILE PATH]" ,	replace nogaps keep( whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment party_unity SymbolicInternalProceduralB AppropriationsB DefenseB ForeignPolicyB EconomyTaxesBudgetB EnergyEnvironmentB GovernmentOpCivilRightsJusticeB WelfareHumanServicesB MiscellaneousDomesticB _cons)  label star(* 0.10 ** 0.05 *** 0.01) b(4) se(4) aic(2) bic(2) nonumbers mtitles("Model 1" "Model 2" "Model 3") compress indicate("Congress Fixed Effects = *congress*") 
	
	eststo clear	


**********
* Appendix C Table 1 [Minority-Party Disappointments Propensity Score Matching and Propensity Score Matching using Nearest Neighbor Approach] *
**********

	eststo: teffects psmatch (minoritysouthern_disapbiB) (whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment)
	eststo: teffects psmatch (minoritysouthern_disapbiB) (whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment) , nn(3)
	
	*esttab using [INSERT DIRECTORY FILE PATH].rtf, ///
	*replace title() mtitles("Propensity Score Matching" "Propensity Score Matching using Nearest Neighbor (3)") nonumbers
	
	eststo clear


**********
* Appendix C Table 2 [Majority-Party Rolls Propensity Score Matching and Propensity Score Matching using Nearest Neighbor Approach] *
**********

	eststo: teffects psmatch (majrollbiB) (whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment)
	eststo: teffects psmatch (majrollbiB) (whipbiB daysinsessionbegin partydifideodim1 majoritysizemargin PresNoB DividedGovernment) , nn(3)	

	*esttab using [INSERT DIRECTORY FILE PATH].rtf, ///
	*replace title() mtitles("Propensity Score Matching" "Propensity Score Matching using Nearest Neighbor (3)") nonumbers
	
	eststo clear	

